
   <?php
include_once "../public/head.php";
@mysql_connect('localhost', 'root', 'root');
mysql_select_db('blog');
mysql_set_charset('utf8');
$sqla ="select * from `lanmu`" ;
$resa = mysql_query($sqla);
while ($rowsa = mysql_fetch_assoc($resa)) {
    $arra[] = $rowsa;
}
?>
   <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="/jscss/admin/design/">首页</a><span class="crumb-step">&gt;</span><a class="crumb-name" href="index.php">博文管理</a><span class="crumb-step">&gt;</span><span>新增博文</span></div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form action="doadd.php" method="post" enctype="multipart/form-data">
                    <table class="insert-tab" width="100%">
                        <tbody>
                            <tr>
                                <th>分类：</th>
                                <td>
                                <select name="id" id="title">
                            <?php 
                                 foreach ($arra as $v) {
                                  echo  '<option value='.$v['id'].'>'.$v['name'].'</option>';
                                    }
                             ?>
                                </select>
                                </td>
                            </tr>
                            <tr>
                                <th>插入图片：</th>
                                <td>
                                   <input  name="pic" size="50" value="" type="file">
                                </td>
                            </tr>
                            <tr>
                                <th>标题：</th>
                                <td>
                                    <input class="common-text required" id="title" name="title" size="50" value="" type="text">
                                </td>
                            </tr>

                            <tr>
                                <th>内容：</th>
                                <script id="container" name="content" type="text/plain" style="width: 1200px">
                                    
                                </script>
                                <!-- <td><textarea name="content" class="common-textarea" id="content" cols="30" style="width: 30%;" rows="10"></textarea></td> -->
                            </tr>
                            <tr>
                                <th>状态：</th>
                                <td>
                                    <input class="common-text required" id="title" name="state" size="50" value="t" type="radio">显示
                                    <input class="common-text required" id="title" name="state" size="50" value="f" type="radio">隐藏
                                </td>
                            </tr>

                            <tr>
                                <th></th>
                                <td>
                                    <input class="btn btn-primary btn6 mr10" value="提交" type="submit">
                                    <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button">
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <!-- 配置文件 -->
                    <script type="text/javascript" src="/public/utf8-php/ueditor.config.js"></script>
                    <!-- 编辑器源码文件 -->
                    <script type="text/javascript" src="/public/utf8-php/ueditor.all.js"></script>
                    <!-- 实例化编辑器 -->
                    <script type="text/javascript">
                        var ue = UE.getEditor('container');
                    </script>
                </form>
            </div>
        </div>

    </div>
    <!--/main-->
 <?php
include_once "../public/after.php";

?>